package _作业.Stream;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class Test06 {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        Collections.addAll(list,"周慧敏",   "张靓颖",  "王一博");
        Stream<String> stream = list.stream();
        Stream<Person> personStream = stream.map(s -> new Person(s));
        List<Person> collect = personStream.collect(Collectors.toList());
        for (Person person : collect) {
            System.out.println(person);
        }
    }
}
